package org.gavin.core.exception;

import org.gavin.core.domain.Status;

/**
 * JsonParseException
 *
 * @author grl
 * @date 2024/4/29
 */
public class JsonConvertException extends BaseException{

    public JsonConvertException(String module, Integer code, Object args, String msg) {
        super(module,code,args,msg);
    }

    public static JsonConvertException le(String module, Integer code, Object args, String msg){
        return new JsonConvertException(module,code,args,msg);
    }

    public static <T extends Status> JsonConvertException le(T status, String module, Object args ){
        return new JsonConvertException(module,status.getCode(),args,status.getMsg());
    }

    public static <T extends Status> JsonConvertException le(T status){
        return new JsonConvertException(null,status.getCode(),null,status.getMsg());
    }
}
